﻿-- get the addon namespace
local addon, ns = ...

-- get the config values
local cfg = ns.cfg
  
-- holder for some lib functions
local lib = _G["HEDD_lib"] or CreateFrame("Frame","HEDD_lib")
_G["HEDD_cfg"] = ns.cfg

BINDING_HEADER_HEDD = "Hedd_C"
BINDING_NAME_TOGGLE_HEDD = "切换HEDD状态"
BINDING_NAME_TOGGLE_DPS_AOE = "切换DPS/AOE模式"

Hedd = {}
function Hedd:Toggle()
	lib.setControlValue(4,0,0,0)
	cfg.shutdownmode = not cfg.shutdownmode
	cfg.Update = true
end

function Hedd:ToggleDPSAOE()
	lib.setControlValue(4,0,0,0)
	lib.onclick()
end
	
function Hedd:SetDPSMode(mode)
	lib.changeDPSMode(mode)
end

function Hedd:Enqueue(spellname)
	lib.enqueueSpell(spellname)
end